1. Field of the Invention
The present invention relates to a power supply control device, an image forming apparatus, and a method of controlling power supply.
2. Description of the Related Art
Electronic devices, such as power supply control devices and image forming apparatuses, are constituted by a system that has various devices including a CPU, a RAM, and a nonvolatile storage medium and constituted by software, such as an operating system (OS) that is stored in a nonvolatile storage medium.
Hard disk drives (HDDs) or flash memories can be used as the nonvolatile storage media that constitute part of the system. However, when flash memories are used, in some cases, a certain block in a flash memory may be corrupted due to a sudden power supply interruption during writing of data, which is a problem.
Accordingly, if flash memories are used, a method of using backup power supplies in case of a sudden power supply interruption is known.
However, with the method of using such a backup power supply, the entire system is protected by the backup power supply; therefore, there is a problem in that a large-capacity power supply is required as a backup power supply, and there is a problem in that a small-capacity power supply cannot protect the entire system. Furthermore, with the method of using such a backup power supply, because the backup power supply is usually controlled by software, it does not effectively perform, for example, just after the software is activated, which is also a problem.
Accordingly, a device disclosed in, for example, Japanese Patent Application Laid-open No. 2005-327210 has been proposed. With the device of Japanese Patent Application Laid-open No. 2005-327210, even when the voltage of a battery (power supply) drops during the writing of data to a flash memory that is a nonvolatile memory, in order to prevent data of the flash memory to be corrupted, electrical power is supplied to the flash memory from a condenser if a battery voltage drops to a level equal to or lower than a predetermined level during the writing of data to the flash memory.
However, even when the device described in Japanese Patent Application Laid-open No. 2005-327210 is used, it is possible to prevent the corruption of a block of a flash memory even when a power supply is interrupted during the writing of data to the flash memory; however, a large-capacity condenser is needed.